import cn.lyh.service.Cat;
import cn.lyh.service.Dog;

public class Test {

    public static void main(String[] args)throws Exception{

            ApplicationContext applicationContext = new ApplicationContext();
            applicationContext.initContextByAnnotation();
            Dog dog = (Dog) applicationContext.getClass(Class.forName("cn.lyh.service.Dog"));
            dog.bark();
    }

}

